<extend name="Public:base" />
<block name="content">
<style type="text/css">
.thumbnail img{
    height: 202px;
}    
</style>
<form action="{$updateUrl}">

<Widget:show col="6" title="更新内容">
<div class="row">
<Ui:field tb="Content" col="12" name="title" value="{$vo.title}" ></Ui:field>
    <Ui:col col="7">
        <div class="row">
            <Ui:field tb="Content" hideipt="true" col="12" name="pageid"  >
                <select data-value="{$vo.pageid}" name="pageid" class="form-control">
                <volist name="pages" id="p">
                <option value="{$p.id}">{$p.title}</option>    
                </volist>    
                </select>
            </Ui:field>
            <Ui:field tip="如果输入网址将直接跳转,不显示以下内容" col="12" name="url" value="{$vo.url}" ></Ui:field>
            <Ui:field col="12" name="intro" value="{$vo.intro}" ></Ui:field>
        </div>
        
    </Ui:col>
    <Ui:col col="5">
        <div class="thumbnail">
            <img data-picurl src="{$vo.picurl}">
            <div class="caption">
                <a href="#" class="fileinput btn btn-sm btn-block btn-primary" >更换封面</a> 
            </div>
        </div>
        
    </Ui:col>
</div>

<button ajax-submit type="submit" class="btn btn-block btn-blue">保存所有</button>
</Widget:show>

<Widget:show col="6" title="更新内容">
    <input type="hidden" name="id" value="{$vo.id}">
    <input type="hidden" name="apid" value="{$apid}">
    <input type="hidden" name="picurl" value="{$vo.picurl}">
<div class="row">
    <Ui:field label="" hideipt="true" col="12" name="content"  >
    <script style="height:380px;width:100%;" id="editor" name="content" type="text/plain" >
    {$vo.content}
    </script>
    </Ui:field>
</div>
</Widget:show>
</form>    

<load href="assets/ueditor/ueditor.config.min.js" />
<load href="assets/ueditor/ueditor.all.min.js" />
<script type="text/javascript">
var ue = UE.getEditor('editor'); 
function fileMangerCall(f){
    $('[name=picurl]').val(f);
    $('[data-picurl]').attr('src',f);

}
</script>
</block>
